package org.ben.xintoucloud.javase.oopduotai;

/**
 * @Author: Ben
 * @Date: 2019/7/11 9:10
 */
public class InstrumentTest {

    public  void duotai(Instrument instrument){
        instrument.play();
    }

    public static void main(String[] args) {
        Instrument instrumentPiano=new Piano();
        Instrument instrumentViolin=new Violin();
        InstrumentTest instrumentTest=new InstrumentTest();
        instrumentTest.duotai(instrumentPiano);
        instrumentTest.duotai(instrumentViolin);
    }
}
